package com.example.zbh.dsliao.db.entity;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import com.example.zbh.dsliao.db.entity.User;
import com.example.zbh.dsliao.db.entity.ApplyFriend;
import com.example.zbh.dsliao.db.entity.CarrouselPic;
import com.example.zbh.dsliao.db.entity.ForYouRecommend;
import com.example.zbh.dsliao.db.entity.HotSongMenu;
import com.example.zbh.dsliao.db.entity.SongRecommend;
import com.example.zbh.dsliao.db.entity.NewSong;
import com.example.zbh.dsliao.db.entity.RadioSet;
import com.example.zbh.dsliao.db.entity.NewSongImg;
import com.example.zbh.dsliao.db.entity.UserContact;
import com.example.zbh.dsliao.db.entity.ImageViewpager;

import com.example.zbh.dsliao.db.entity.UserDao;
import com.example.zbh.dsliao.db.entity.ApplyFriendDao;
import com.example.zbh.dsliao.db.entity.CarrouselPicDao;
import com.example.zbh.dsliao.db.entity.ForYouRecommendDao;
import com.example.zbh.dsliao.db.entity.HotSongMenuDao;
import com.example.zbh.dsliao.db.entity.SongRecommendDao;
import com.example.zbh.dsliao.db.entity.NewSongDao;
import com.example.zbh.dsliao.db.entity.RadioSetDao;
import com.example.zbh.dsliao.db.entity.NewSongImgDao;
import com.example.zbh.dsliao.db.entity.UserContactDao;
import com.example.zbh.dsliao.db.entity.ImageViewpagerDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig userDaoConfig;
    private final DaoConfig applyFriendDaoConfig;
    private final DaoConfig carrouselPicDaoConfig;
    private final DaoConfig forYouRecommendDaoConfig;
    private final DaoConfig hotSongMenuDaoConfig;
    private final DaoConfig songRecommendDaoConfig;
    private final DaoConfig newSongDaoConfig;
    private final DaoConfig radioSetDaoConfig;
    private final DaoConfig newSongImgDaoConfig;
    private final DaoConfig userContactDaoConfig;
    private final DaoConfig imageViewpagerDaoConfig;

    private final UserDao userDao;
    private final ApplyFriendDao applyFriendDao;
    private final CarrouselPicDao carrouselPicDao;
    private final ForYouRecommendDao forYouRecommendDao;
    private final HotSongMenuDao hotSongMenuDao;
    private final SongRecommendDao songRecommendDao;
    private final NewSongDao newSongDao;
    private final RadioSetDao radioSetDao;
    private final NewSongImgDao newSongImgDao;
    private final UserContactDao userContactDao;
    private final ImageViewpagerDao imageViewpagerDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        userDaoConfig = daoConfigMap.get(UserDao.class).clone();
        userDaoConfig.initIdentityScope(type);

        applyFriendDaoConfig = daoConfigMap.get(ApplyFriendDao.class).clone();
        applyFriendDaoConfig.initIdentityScope(type);

        carrouselPicDaoConfig = daoConfigMap.get(CarrouselPicDao.class).clone();
        carrouselPicDaoConfig.initIdentityScope(type);

        forYouRecommendDaoConfig = daoConfigMap.get(ForYouRecommendDao.class).clone();
        forYouRecommendDaoConfig.initIdentityScope(type);

        hotSongMenuDaoConfig = daoConfigMap.get(HotSongMenuDao.class).clone();
        hotSongMenuDaoConfig.initIdentityScope(type);

        songRecommendDaoConfig = daoConfigMap.get(SongRecommendDao.class).clone();
        songRecommendDaoConfig.initIdentityScope(type);

        newSongDaoConfig = daoConfigMap.get(NewSongDao.class).clone();
        newSongDaoConfig.initIdentityScope(type);

        radioSetDaoConfig = daoConfigMap.get(RadioSetDao.class).clone();
        radioSetDaoConfig.initIdentityScope(type);

        newSongImgDaoConfig = daoConfigMap.get(NewSongImgDao.class).clone();
        newSongImgDaoConfig.initIdentityScope(type);

        userContactDaoConfig = daoConfigMap.get(UserContactDao.class).clone();
        userContactDaoConfig.initIdentityScope(type);

        imageViewpagerDaoConfig = daoConfigMap.get(ImageViewpagerDao.class).clone();
        imageViewpagerDaoConfig.initIdentityScope(type);

        userDao = new UserDao(userDaoConfig, this);
        applyFriendDao = new ApplyFriendDao(applyFriendDaoConfig, this);
        carrouselPicDao = new CarrouselPicDao(carrouselPicDaoConfig, this);
        forYouRecommendDao = new ForYouRecommendDao(forYouRecommendDaoConfig, this);
        hotSongMenuDao = new HotSongMenuDao(hotSongMenuDaoConfig, this);
        songRecommendDao = new SongRecommendDao(songRecommendDaoConfig, this);
        newSongDao = new NewSongDao(newSongDaoConfig, this);
        radioSetDao = new RadioSetDao(radioSetDaoConfig, this);
        newSongImgDao = new NewSongImgDao(newSongImgDaoConfig, this);
        userContactDao = new UserContactDao(userContactDaoConfig, this);
        imageViewpagerDao = new ImageViewpagerDao(imageViewpagerDaoConfig, this);

        registerDao(User.class, userDao);
        registerDao(ApplyFriend.class, applyFriendDao);
        registerDao(CarrouselPic.class, carrouselPicDao);
        registerDao(ForYouRecommend.class, forYouRecommendDao);
        registerDao(HotSongMenu.class, hotSongMenuDao);
        registerDao(SongRecommend.class, songRecommendDao);
        registerDao(NewSong.class, newSongDao);
        registerDao(RadioSet.class, radioSetDao);
        registerDao(NewSongImg.class, newSongImgDao);
        registerDao(UserContact.class, userContactDao);
        registerDao(ImageViewpager.class, imageViewpagerDao);
    }
    
    public void clear() {
        userDaoConfig.getIdentityScope().clear();
        applyFriendDaoConfig.getIdentityScope().clear();
        carrouselPicDaoConfig.getIdentityScope().clear();
        forYouRecommendDaoConfig.getIdentityScope().clear();
        hotSongMenuDaoConfig.getIdentityScope().clear();
        songRecommendDaoConfig.getIdentityScope().clear();
        newSongDaoConfig.getIdentityScope().clear();
        radioSetDaoConfig.getIdentityScope().clear();
        newSongImgDaoConfig.getIdentityScope().clear();
        userContactDaoConfig.getIdentityScope().clear();
        imageViewpagerDaoConfig.getIdentityScope().clear();
    }

    public UserDao getUserDao() {
        return userDao;
    }

    public ApplyFriendDao getApplyFriendDao() {
        return applyFriendDao;
    }

    public CarrouselPicDao getCarrouselPicDao() {
        return carrouselPicDao;
    }

    public ForYouRecommendDao getForYouRecommendDao() {
        return forYouRecommendDao;
    }

    public HotSongMenuDao getHotSongMenuDao() {
        return hotSongMenuDao;
    }

    public SongRecommendDao getSongRecommendDao() {
        return songRecommendDao;
    }

    public NewSongDao getNewSongDao() {
        return newSongDao;
    }

    public RadioSetDao getRadioSetDao() {
        return radioSetDao;
    }

    public NewSongImgDao getNewSongImgDao() {
        return newSongImgDao;
    }

    public UserContactDao getUserContactDao() {
        return userContactDao;
    }

    public ImageViewpagerDao getImageViewpagerDao() {
        return imageViewpagerDao;
    }

}
